exports.find = function(req, success,host,port,path,method,data){
	var http = require('http');
	var querystring = require('querystring');
	var post_data = querystring.stringify(data);

    var options = {
        host: host,
        port: port,
        path: path,
        method: method,
    };

    req = http.request(options, function(res) {
        res.setEncoding('utf8');
        res.on('data', function (data) {
//        	console.log('>>> ', data);
//        	try{
//        		data = JSON.parse(data);
//        	}catch(e){
//            	console.error("httphelper.find.request.on:"+e);
//            	data={msg:'数据解析错误,非json格式'};
//            }
            success(data);
        });
    });

    req.on('error', function(e){
    	data="请求失败:请输入正确的路径," + e.message;
//       console.log(data);
       success(data);
    });
    req.write(post_data + "\n");
    req.end();
}